﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpages/Main.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeFile="ProjectStatusDetails.aspx.cs" Inherits="User_Shares_ProjectStatusDetails" %>

<%@ Register TagPrefix="uc2" TagName="filedownload" Src="~/Controls/FileDownload/FileDownload.ascx" %>
<%@ Register Src="../../Controls/ContentHolder/Holder1.ascx" TagName="Holder1" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script language="javascript" type="text/javascript">
        function CallPrint(strid) {
            var prtContent = document.getElementById(strid);
            var WinPrint = window.open('', '', 'letf=0,top=0,width=100%,height=100%,toolbar=0,scrollbars=2,status=0');
            WinPrint.document.write(prtContent.innerHTML);
            WinPrint.document.close();
            WinPrint.focus();
            WinPrint.print();
            WinPrint.close();
            //            prtContent.innerHTML = strOldOne;
        }
    </script>
    <uc1:Holder1 ID="Holder11" runat="server" Title="نمایش جزئیات پروژه">
        <ContentTemplate>
            <div id="printdiv">
                <div style="color: Black; margin: 15px; font-family: Tahoma; font-size: x-small;">
                    <b>
                        <asp:Label ID="LabelCityName" runat="server" Text=""></asp:Label>
                        <br />
                        <asp:Label ID="LabelVillageName" runat="server" Text=""></asp:Label>
                        <br />
                        <asp:Label ID="LabelContractType" runat="server" Text=""></asp:Label>
                        <br />
                        <asp:Label ID="LabelDoer" runat="server" Text=""></asp:Label>
                        <br />
                        <asp:Label ID="LabelFourthFactor" runat="server" Text=""></asp:Label>
                    </b>
                </div>
                <asp:GridView ID="GridViewProjectDetails" runat="server" AutoGenerateColumns="False"
                    EnableModelValidation="True" OnRowDataBound="GridViewProjectDetails_RowDataBound"
                    ShowHeader="false" Font-Names="Tahoma" Font-Size="X-Small">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div id="contentDiv" style="direction: rtl; text-align: right; padding: 5px; margin: 1px;
                                    color: Black;">
                                    <div id="headerDiv" style="background-color: #94C6FC;">
                                        <b>
                                            <asp:Label ID="LabelStepName" ForeColor="Black" runat="server" Text='<%# Eval( "StepName" ) %>'></asp:Label>
                                        </b>
                                    </div>
                                    <div id="filesDiv" style="background-color: #CCE1F8;">
                                        <asp:Label ID="Label1" runat="server" Text="فایل ها:"></asp:Label><br />
                                        <uc2:filedownload ID="FileDownload1" runat="server" TaskId='<%# Eval( "TaskId" ) %>' />
                                    </div>
                                    <div id="delayDiv" style="background-color: #94C6FC">
                                        <asp:Label ID="LabelDelay" runat="server" Text='<%# string.Format( "میزان دیرکرد این مرحله: {0} روز", Eval( "Latency" ) ) %>'></asp:Label>
                                    </div>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#99CCFF" />
                </asp:GridView>
            </div>
            <%--<asp:Button runat="server" Text="پرینت" ID="Print" CssClass="MainObject" 
        onclick="CallPrint(printdiv);" Width="70px" />--%>
            <input id="Button1" type="button" onclick="CallPrint('printdiv')" value="پرینت" />
        </ContentTemplate>
    </uc1:Holder1>
</asp:Content>
